<template>
  <div v-loading="loading" class="iframe-warp">
    <iframe :src="url" frameborder="no" scrolling="auto" style="width: 100%;height: 100%;" />
  </div>
</template>

<script setup>
const props = defineProps({
  src: {
    type: String,
    required: true
  }
})

const height = ref(document.documentElement.clientHeight - 94.5 + "px;")
const loading = ref(true)
const url = computed(() => props.src)

onMounted(() => {
  setTimeout(() => {
    loading.value = false;
  }, 300);
  window.onresize = function temp() {
    height.value = document.documentElement.clientHeight - 94.5 + "px;";
    console.log(height.value, 'height');
  };
})
</script>


<style lang="scss" scoped>
.iframe-warp {
  min-width: 900px !important;
  width: 80% !important;
  height: 90% !important;
  z-index: 100001;
  // border: 1px solid #ccc;
  iframe {
    // background: #fff;
  }
}
</style>
